<!--

     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.

-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- **************************************************************** -->
<!-- *  PLEASE KEEP COMPLICATED EXPRESSIONS OUT OF THESE TEMPLATES, * -->
<!-- *  i.e. only iterate & print data where possible. Thanks, Jez. * -->
<!-- **************************************************************** -->

<html>
<head>
    <!-- Generated by groovydoc (2.4.5) on Mon Sep 12 08:35:18 CEST 2016 -->
    <title>HttpServerResponse (Groovy Documentation)</title>
    <meta name="date" content="2016-09-12">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
    <link href="../../../../../groovy.ico" type="image/x-icon" rel="icon">
    <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
    parent.document.title="HttpServerResponse (Groovy Documentation)";
}
//-->
</script>
<noscript>
    <div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
    <!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../../../index-all.html">Index</a></li>
        <li><a href="../../../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../../../index.html?io/vertx/groovy/core/http/HttpServerResponse" target="_top">Frames</a></li>
            <li><a href="HttpServerResponse.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <a name="skip-navbar_top">
        <!--   -->
    </a></div>
<!-- ========= END OF TOP NAVBAR ========= -->

<!-- ======== START OF CLASS DATA ======== -->
<div class="header">

    <div class="subTitle">Package: <strong>io.vertx.groovy.core.http</strong></div>

    <h2 title="[Groovy] Class HttpServerResponse" class="title">[Groovy] Class HttpServerResponse</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><ul class="inheritance"></ul></li><li>io.vertx.groovy.core.http.HttpServerResponse
</ul>
<div class="description">
    <ul class="blockList">
        <li class="blockList">

            <dl>
                <dt>All Implemented Interfaces and Traits:</dt>
                <dd><a href='../../../../../io/vertx/groovy/core/streams/WriteStream.html'>WriteStream</a></dd>
            </dl>
            <!-- todo: direct known subclasses -->
            <hr>
            <br>
<pre>@groovy.transform.CompileStatic
class HttpServerResponse
extends java.lang.Object

</pre>



    <p> Represents a server-side HTTP response.
 <p>
 An instance of this is created and associated to every instance of
 <a href='../../../../../io/vertx/groovy/core/http/HttpServerRequest.html' title='HttpServerRequest'>HttpServerRequest</a> that.
 <p>
 It allows the developer to control the HTTP response that is sent back to the
 client for a particular HTTP request.
 <p>
 It contains methods that allow HTTP headers and trailers to be set, and for a body to be written out to the response.
 <p>
 It also allows files to be streamed by the kernel directly from disk to the
 outgoing HTTP connection, bypassing user space altogether (where supported by
 the underlying operating system). This is a very efficient way of
 serving files from the server since buffers do not have to be read one by one
 from the file and written to the outgoing socket.
 <p>
 It implements <a href='../../../../../io/vertx/groovy/core/streams/WriteStream.html' title='WriteStream'>WriteStream</a> so it can be used with
 <a href='../../../../../io/vertx/groovy/core/streams/Pump.html' title='Pump'>Pump</a> to pump data with flow control.
</p>

          </li>
    </ul>
</div>

<div class="summary">
    <ul class="blockList">
        <li class="blockList">
        <!-- =========== NESTED CLASS SUMMARY =========== -->
        

        <!-- =========== ENUM CONSTANT SUMMARY =========== -->
        
        <!-- =========== FIELD SUMMARY =========== -->
        

        <!-- =========== PROPERTY SUMMARY =========== -->
        

        <!-- =========== ELEMENT SUMMARY =========== -->
        

        
        <!-- ======== CONSTRUCTOR SUMMARY ======== -->
        <ul class="blockList">
                <li class="blockList"><a name="constructor_summary"><!--   --></a>
                    <h3>Constructor Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructors Summary table">
                        <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Constructor and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst">
                                <code><a href="#HttpServerResponse(java.lang.Object)">HttpServerResponse</a></strong>
                                (java.lang.Object delegate)</code><br></td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
        </ul>
        

        
        <!-- ========== METHOD SUMMARY =========== -->
        <ul class="blockList">
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Methods Summary table">
                        <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Type</th>
                            <th class="colLast" scope="col">Name and description</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#bodyEndHandler(Handler<Void>)">bodyEndHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</code><br>Provides a handler that will be called after the last part of the body is written to the wire.
 </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>long</strong></code></td>
                            <td class="colLast"><code><strong><a href="#bytesWritten()">bytesWritten</a></strong>()</code><br>@return the total number of bytes written for the body of the response.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#close()">close</a></strong>()</code><br>Close the underlying TCP connection corresponding to the request.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#closeHandler(Handler<Void>)">closeHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</code><br>Set a close handler for the response. </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#closed()">closed</a></strong>()</code><br>@return has the underlying TCP connection corresponding to the request already been closed?</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#drainHandler(Handler<Void>)">drainHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#end(java.lang.String)">end</a></strong>(java.lang.String chunk)</code><br>Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#end' title='HttpServerResponse.end'>HttpServerResponse.end</a> but writes a String in UTF-8 encoding before ending the response.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#end(java.lang.String, java.lang.String)">end</a></strong>(java.lang.String chunk, java.lang.String enc)</code><br>Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#end' title='HttpServerResponse.end'>HttpServerResponse.end</a> but writes a String with the specified encoding before ending the response.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#end(io.vertx.groovy.core.buffer.Buffer)">end</a></strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> chunk)</code><br>Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#end' title='HttpServerResponse.end'>HttpServerResponse.end</a> but writes some data to the response body before ending. </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#end()">end</a></strong>()</code><br>Ends the response. </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#ended()">ended</a></strong>()</code><br>@return has the response already ended?</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#exceptionHandler(Handler<Throwable>)">exceptionHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Throwable&gt; handler)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.Object</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getDelegate()">getDelegate</a></strong>()</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>int</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getStatusCode()">getStatusCode</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>the HTTP status code of the response.</DD></DL></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>java.lang.String</strong></code></td>
                            <td class="colLast"><code><strong><a href="#getStatusMessage()">getStatusMessage</a></strong>()</code><br> <DL><DT><B>Returns:</B></DT><DD>the HTTP status message of the response.</DD></DL></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#headWritten()">headWritten</a></strong>()</code><br>@return have the headers for the response already been written?</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#headers()">headers</a></strong>()</code><br>@return The HTTP headers</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#headersEndHandler(Handler<Void>)">headersEndHandler</a></strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</code><br>Provide a handler that will be called just before the headers are written to the wire.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#isChunked()">isChunked</a></strong>()</code><br>@return is the response chunked?</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#push(io.vertx.core.http.HttpMethod, java.lang.String, java.lang.String, Handler<AsyncResult<HttpServerResponse>>)">push</a></strong>(io.vertx.core.http.HttpMethod method, java.lang.String host, java.lang.String path, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</code><br>Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#push' title='HttpServerResponse.push'>HttpServerResponse.push</a> with no headers.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#push(io.vertx.core.http.HttpMethod, java.lang.String, io.vertx.groovy.core.MultiMap, Handler<AsyncResult<HttpServerResponse>>)">push</a></strong>(io.vertx.core.http.HttpMethod method, java.lang.String path, <a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a> headers, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</code><br>Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#push' title='HttpServerResponse.push'>HttpServerResponse.push</a> with the host copied from the current request.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#push(io.vertx.core.http.HttpMethod, java.lang.String, Handler<AsyncResult<HttpServerResponse>>)">push</a></strong>(io.vertx.core.http.HttpMethod method, java.lang.String path, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</code><br>Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#push' title='HttpServerResponse.push'>HttpServerResponse.push</a> with the host copied from the current request.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#push(io.vertx.core.http.HttpMethod, java.lang.String, java.lang.String, io.vertx.groovy.core.MultiMap, Handler<AsyncResult<HttpServerResponse>>)">push</a></strong>(io.vertx.core.http.HttpMethod method, java.lang.String host, java.lang.String path, <a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a> headers, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</code><br>Push a response to the client.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#putHeader(java.lang.String, java.lang.String)">putHeader</a></strong>(java.lang.String name, java.lang.String value)</code><br>Put an HTTP header</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#putTrailer(java.lang.String, java.lang.String)">putTrailer</a></strong>(java.lang.String name, java.lang.String value)</code><br>Put an HTTP trailer</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#reset()">reset</a></strong>()</code><br>Reset this HTTP/2 stream with the error code <code>0</code>.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>void</strong></code></td>
                            <td class="colLast"><code><strong><a href="#reset(long)">reset</a></strong>(long code)</code><br>Reset this HTTP/2 stream with the error <code>code</code>.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#sendFile(java.lang.String)">sendFile</a></strong>(java.lang.String filename)</code><br>Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> using offset @code{0} which means starting from the beginning of the file.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#sendFile(java.lang.String, long)">sendFile</a></strong>(java.lang.String filename, long offset)</code><br>Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> using length @code{Long.MAX_VALUE} which means until the end of the
 file.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#sendFile(java.lang.String, long, long)">sendFile</a></strong>(java.lang.String filename, long offset, long length)</code><br>Ask the OS to stream a file as specified by <code>filename</code> directly
 from disk to the outgoing connection, bypassing userspace altogether
 (where supported by the underlying operating system.
 </td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#sendFile(java.lang.String, Handler<AsyncResult<Void>>)">sendFile</a></strong>(java.lang.String filename, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; resultHandler)</code><br>Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> but providing a handler which will be notified once the file has been completely
 written to the wire.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#sendFile(java.lang.String, long, Handler<AsyncResult<Void>>)">sendFile</a></strong>(java.lang.String filename, long offset, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; resultHandler)</code><br>Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> but providing a handler which will be notified once the file has been completely
 written to the wire.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#sendFile(java.lang.String, long, long, Handler<AsyncResult<Void>>)">sendFile</a></strong>(java.lang.String filename, long offset, long length, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; resultHandler)</code><br>Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> but providing a handler which will be notified once the file has been
 completely written to the wire.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setChunked(boolean)">setChunked</a></strong>(boolean chunked)</code><br>If <code>chunked</code> is <code>true</code>, this response will use HTTP chunked encoding, and each call to write to the body
 will correspond to a new HTTP chunk sent on the wire.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setStatusCode(int)">setStatusCode</a></strong>(int statusCode)</code><br>Set the status code. </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setStatusMessage(java.lang.String)">setStatusMessage</a></strong>(java.lang.String statusMessage)</code><br>Set the status message</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#setWriteQueueMaxSize(int)">setWriteQueueMaxSize</a></strong>(int maxSize)</code><br></td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>int</strong></code></td>
                            <td class="colLast"><code><strong><a href="#streamId()">streamId</a></strong>()</code><br>@return the id of the stream of this response,  for HTTP/1.x</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#trailers()">trailers</a></strong>()</code><br>@return The HTTP trailers</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#write(io.vertx.groovy.core.buffer.Buffer)">write</a></strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> data)</code><br></td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#write(java.lang.String, java.lang.String)">write</a></strong>(java.lang.String chunk, java.lang.String enc)</code><br>Write a java.lang.String to the response body, encoded using the encoding <code>enc</code>.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#write(java.lang.String)">write</a></strong>(java.lang.String chunk)</code><br>Write a java.lang.String to the response body, encoded in UTF-8.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#writeContinue()">writeContinue</a></strong>()</code><br>Used to write an interim 100 Continue response to signify that the client should send the rest of the request.
 </td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#writeCustomFrame(int, int, io.vertx.groovy.core.buffer.Buffer)">writeCustomFrame</a></strong>(int type, int flags, <a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> payload)</code><br>Write an HTTP/2 frame to the response, allowing to extend the HTTP/2 protocol.</td>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a></strong></code></td>
                            <td class="colLast"><code><strong><a href="#writeCustomFrame(io.vertx.groovy.core.http.HttpFrame)">writeCustomFrame</a></strong>(<a href='../../../../../io/vertx/groovy/core/http/HttpFrame.html'>HttpFrame</a> frame)</code><br>Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#writeCustomFrame' title='HttpServerResponse.writeCustomFrame'>HttpServerResponse.writeCustomFrame</a> but with an <a href='../../../../../io/vertx/groovy/core/http/HttpFrame.html' title='HttpFrame'>HttpFrame</a>.</td>
                        </tr>
                        
                        <tr class="rowColor">
                            <td class="colFirst"><code>boolean</strong></code></td>
                            <td class="colLast"><code><strong><a href="#writeQueueFull()">writeQueueFull</a></strong>()</code><br>This will return <code>true</code> if there are more bytes in the write queue than the value set using <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#setWriteQueueMaxSize' title='HttpServerResponse.setWriteQueueMaxSize'>HttpServerResponse.setWriteQueueMaxSize</a></td>
                        </tr>
                        
                    </table>
                   </ul>
              </li>
            
            <li class="blockList"><a name="method_summary"><!--   --></a>
                    <h3>Inherited Methods Summary</h3>
                    <ul class="blockList">
                    <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Inherited Methods Summary table">
                        <caption><span>Inherited Methods</span><span class="tabEnd">&nbsp;</span></caption>
                        <tr>
                            <th class="colFirst" scope="col">Methods inherited from class</th>
                            <th class="colLast" scope="col">Name</th>
                        </tr>
                        
                        <tr class="altColor">
                            <td class="colFirst"><code>class java.lang.Object</strong></code></td>
                            <td class="colLast"><code>java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()</code></td>
                        </tr>
                    </table>
                   </ul>
              </li>
                
        </ul>
        
    </li>
    </ul>
</div>

<div class="details">
    <ul class="blockList">
        <li class="blockList">
           

            

            

            

            
            <!-- =========== CONSTRUCTOR DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="constructor_detail">
                    <!--   -->
                </a>
                    <h3>Constructor Detail</h3>
                    
                        <a name="HttpServerResponse(java.lang.Object)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><strong>HttpServerResponse</strong>(java.lang.Object delegate)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            


            
            <!-- =========== METHOD DETAIL =========== -->
            <ul class="blockList">
                <li class="blockList"><a name="method_detail">
                    <!--   -->
                </a>
                    <h3>Method Detail</h3>
                    
                        <a name="bodyEndHandler(Handler<Void>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>bodyEndHandler</strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</h4>
                                <p> Provides a handler that will be called after the last part of the body is written to the wire.
 The handler is called asynchronously of when the response has been received by the client.
 This provides a hook allowing you to do more operations once the request has been sent over the wire
 such as resource cleanup.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>handler</code> -  the handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="bytesWritten()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>long <strong>bytesWritten</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>the total number of bytes written for the body of the response.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="close()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>close</strong>()</h4>
                                <p> Close the underlying TCP connection corresponding to the request.
   </p>
                            </li>
                        </ul>
                    
                        <a name="closeHandler(Handler<Void>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>closeHandler</strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</h4>
                                <p> Set a close handler for the response. This will be called if the underlying connection closes before the response
 is complete.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>handler</code> -  the handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="closed()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>boolean <strong>closed</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>has the underlying TCP connection corresponding to the request already been closed?</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="drainHandler(Handler<Void>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>drainHandler</strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="end(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>end</strong>(java.lang.String chunk)</h4>
                                <p> Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#end' title='HttpServerResponse.end'>HttpServerResponse.end</a> but writes a String in UTF-8 encoding before ending the response.
   <DL><DT><B>Parameters:</B></DT><DD><code>chunk</code> -  the string to write before ending the response</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="end(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>end</strong>(java.lang.String chunk, java.lang.String enc)</h4>
                                <p> Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#end' title='HttpServerResponse.end'>HttpServerResponse.end</a> but writes a String with the specified encoding before ending the response.
   <DL><DT><B>Parameters:</B></DT><DD><code>chunk</code> -  the string to write before ending the response</DD><DD><code>enc</code> -  the encoding to use</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="end(io.vertx.groovy.core.buffer.Buffer)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>end</strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> chunk)</h4>
                                <p> Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#end' title='HttpServerResponse.end'>HttpServerResponse.end</a> but writes some data to the response body before ending. If the response is not chunked and
 no other data has been written then the @code{Content-Length} header will be automatically set.
   <DL><DT><B>Parameters:</B></DT><DD><code>chunk</code> -  the buffer to write before ending the response</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="end()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>end</strong>()</h4>
                                <p> Ends the response. If no data has been written to the response body,
 the actual response won't get written until this method gets called.
 <p>
 Once the response has ended, it cannot be used any more.
   </p>
                            </li>
                        </ul>
                    
                        <a name="ended()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>boolean <strong>ended</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>has the response already ended?</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="exceptionHandler(Handler<Throwable>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>exceptionHandler</strong>(io.vertx.core.Handler&lt;java.lang.Throwable&gt; handler)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="getDelegate()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>java.lang.Object <strong>getDelegate</strong>()</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="getStatusCode()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>int <strong>getStatusCode</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>the HTTP status code of the response. The default is <code>200</code> representing <code>OK</code>.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="getStatusMessage()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>java.lang.String <strong>getStatusMessage</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>the HTTP status message of the response. If this is not specified a default value will be used depending on what <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#setStatusCode' title='HttpServerResponse.setStatusCode'>HttpServerResponse.setStatusCode</a> has been set to.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="headWritten()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>boolean <strong>headWritten</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>have the headers for the response already been written?</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="headers()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a> <strong>headers</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>The HTTP headers</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="headersEndHandler(Handler<Void>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>headersEndHandler</strong>(io.vertx.core.Handler&lt;java.lang.Void&gt; handler)</h4>
                                <p> Provide a handler that will be called just before the headers are written to the wire.<p>
 This provides a hook allowing you to add any more headers or do any more operations before this occurs.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>handler</code> -  the handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="isChunked()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>boolean <strong>isChunked</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>is the response chunked?</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="push(io.vertx.core.http.HttpMethod, java.lang.String, java.lang.String, Handler<AsyncResult<HttpServerResponse>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>push</strong>(io.vertx.core.http.HttpMethod method, java.lang.String host, java.lang.String path, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</h4>
                                <p> Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#push' title='HttpServerResponse.push'>HttpServerResponse.push</a> with no headers. <DL><DT><B>Returns:</B></DT><DD></DD></DL><DL><DT><B>Parameters:</B></DT><DD>method</DD><DD>host</DD><DD>path</DD><DD>handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="push(io.vertx.core.http.HttpMethod, java.lang.String, io.vertx.groovy.core.MultiMap, Handler<AsyncResult<HttpServerResponse>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>push</strong>(io.vertx.core.http.HttpMethod method, java.lang.String path, <a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a> headers, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</h4>
                                <p> Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#push' title='HttpServerResponse.push'>HttpServerResponse.push</a> with the host copied from the current request. <DL><DT><B>Returns:</B></DT><DD></DD></DL><DL><DT><B>Parameters:</B></DT><DD>method</DD><DD>path</DD><DD>headers</DD><DD>handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="push(io.vertx.core.http.HttpMethod, java.lang.String, Handler<AsyncResult<HttpServerResponse>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>push</strong>(io.vertx.core.http.HttpMethod method, java.lang.String path, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</h4>
                                <p> Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#push' title='HttpServerResponse.push'>HttpServerResponse.push</a> with the host copied from the current request. <DL><DT><B>Returns:</B></DT><DD></DD></DL><DL><DT><B>Parameters:</B></DT><DD>method</DD><DD>path</DD><DD>handler</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="push(io.vertx.core.http.HttpMethod, java.lang.String, java.lang.String, io.vertx.groovy.core.MultiMap, Handler<AsyncResult<HttpServerResponse>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>push</strong>(io.vertx.core.http.HttpMethod method, java.lang.String host, java.lang.String path, <a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a> headers, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;<a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html' title='HttpServerResponse'>HttpServerResponse</a>&gt;&gt; handler)</h4>
                                <p> Push a response to the client.<p/>

 The <code>handler</code> will be notified with a <i>success</i> when the push can be sent and with
 a <i>failure</i> when the client has disabled push or reset the push before it has been sent.<p/>

 The <code>handler</code> may be queued if the client has reduced the maximum number of streams the server can push
 concurrently.<p/>

 Push can be sent only for peer initiated streams and if the response is not ended.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>method</code> -  the method of the promised request</DD><DD><code>host</code> -  the host of the promised request</DD><DD><code>path</code> -  the path of the promised request</DD><DD><code>headers</code> -  the headers of the promised request</DD><DD><code>handler</code> -  the handler notified when the response can be written</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="putHeader(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>putHeader</strong>(java.lang.String name, java.lang.String value)</h4>
                                <p> Put an HTTP header
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>name</code> -  the header name</DD><DD><code>value</code> -  the header value.</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="putTrailer(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>putTrailer</strong>(java.lang.String name, java.lang.String value)</h4>
                                <p> Put an HTTP trailer
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>name</code> -  the trailer name</DD><DD><code>value</code> -  the trailer value</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="reset()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>reset</strong>()</h4>
                                <p> Reset this HTTP/2 stream with the error code <code>0</code>.
   </p>
                            </li>
                        </ul>
                    
                        <a name="reset(long)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>void <strong>reset</strong>(long code)</h4>
                                <p> Reset this HTTP/2 stream with the error <code>code</code>.
   <DL><DT><B>Parameters:</B></DT><DD><code>code</code> -  the error code</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="sendFile(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>sendFile</strong>(java.lang.String filename)</h4>
                                <p> Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> using offset @code{0} which means starting from the beginning of the file.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>filename</code> -  path to the file to serve</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="sendFile(java.lang.String, long)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>sendFile</strong>(java.lang.String filename, long offset)</h4>
                                <p> Same as <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> using length @code{Long.MAX_VALUE} which means until the end of the
 file.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>filename</code> -  path to the file to serve</DD><DD><code>offset</code> -  offset to start serving from</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="sendFile(java.lang.String, long, long)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>sendFile</strong>(java.lang.String filename, long offset, long length)</h4>
                                <p> Ask the OS to stream a file as specified by <code>filename</code> directly
 from disk to the outgoing connection, bypassing userspace altogether
 (where supported by the underlying operating system.
 This is a very efficient way to serve files.<p>
 The actual serve is asynchronous and may not complete until some time after this method has returned.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>filename</code> -  path to the file to serve</DD><DD><code>offset</code> -  offset to start serving from</DD><DD><code>length</code> -  length to serve to</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="sendFile(java.lang.String, Handler<AsyncResult<Void>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>sendFile</strong>(java.lang.String filename, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; resultHandler)</h4>
                                <p> Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> but providing a handler which will be notified once the file has been completely
 written to the wire.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>filename</code> -  path to the file to serve</DD><DD><code>resultHandler</code> -  handler that will be called on completion</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="sendFile(java.lang.String, long, Handler<AsyncResult<Void>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>sendFile</strong>(java.lang.String filename, long offset, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; resultHandler)</h4>
                                <p> Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> but providing a handler which will be notified once the file has been completely
 written to the wire.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>filename</code> -  path to the file to serve</DD><DD><code>offset</code> -  the offset to serve from</DD><DD><code>resultHandler</code> -  handler that will be called on completion</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="sendFile(java.lang.String, long, long, Handler<AsyncResult<Void>>)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>sendFile</strong>(java.lang.String filename, long offset, long length, io.vertx.core.Handler&lt;io.vertx.core.AsyncResult&lt;java.lang.Void&gt;&gt; resultHandler)</h4>
                                <p> Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#sendFile' title='HttpServerResponse.sendFile'>HttpServerResponse.sendFile</a> but providing a handler which will be notified once the file has been
 completely written to the wire.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>filename</code> -  path to the file to serve</DD><DD><code>offset</code> -  the offset to serve from</DD><DD><code>length</code> -  the length to serve to</DD><DD><code>resultHandler</code> -  handler that will be called on completion</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="setChunked(boolean)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>setChunked</strong>(boolean chunked)</h4>
                                <p> If <code>chunked</code> is <code>true</code>, this response will use HTTP chunked encoding, and each call to write to the body
 will correspond to a new HTTP chunk sent on the wire.
 <p>
 If chunked encoding is used the HTTP header <code>Transfer-Encoding</code> with a value of <code>Chunked</code> will be
 automatically inserted in the response.
 <p>
 If <code>chunked</code> is <code>false</code>, this response will not use HTTP chunked encoding, and therefore the total size
 of any data that is written in the respone body must be set in the <code>Content-Length</code> header <b>before</b> any
 data is written out.
 <p>
 An HTTP chunked response is typically used when you do not know the total size of the request body up front.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD>chunked</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="setStatusCode(int)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>setStatusCode</strong>(int statusCode)</h4>
                                <p> Set the status code. If the status message hasn't been explicitly set, a default status message corresponding
 to the code will be looked-up and used.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD>statusCode</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="setStatusMessage(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>setStatusMessage</strong>(java.lang.String statusMessage)</h4>
                                <p> Set the status message
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD>statusMessage</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="setWriteQueueMaxSize(int)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>setWriteQueueMaxSize</strong>(int maxSize)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="streamId()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>int <strong>streamId</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>the id of the stream of this response,  for HTTP/1.x</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="trailers()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/MultiMap.html'>MultiMap</a> <strong>trailers</strong>()</h4>
                                <p>
   <DL><DT><B>Returns:</B></DT><DD>The HTTP trailers</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="write(io.vertx.groovy.core.buffer.Buffer)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>write</strong>(<a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> data)</h4>
                                <p></p>
                            </li>
                        </ul>
                    
                        <a name="write(java.lang.String, java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>write</strong>(java.lang.String chunk, java.lang.String enc)</h4>
                                <p> Write a java.lang.String to the response body, encoded using the encoding <code>enc</code>.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>chunk</code> -  the string to write</DD><DD><code>enc</code> -  the encoding to use</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="write(java.lang.String)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>write</strong>(java.lang.String chunk)</h4>
                                <p> Write a java.lang.String to the response body, encoded in UTF-8.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>chunk</code> -  the string to write</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="writeContinue()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>writeContinue</strong>()</h4>
                                <p> Used to write an interim 100 Continue response to signify that the client should send the rest of the request.
 Must only be used if the request contains an "Expect:100-Continue" header
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="writeCustomFrame(int, int, io.vertx.groovy.core.buffer.Buffer)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>writeCustomFrame</strong>(int type, int flags, <a href='../../../../../io/vertx/groovy/core/buffer/Buffer.html'>Buffer</a> payload)</h4>
                                <p> Write an HTTP/2 frame to the response, allowing to extend the HTTP/2 protocol.<p>

 The frame is sent immediatly and is not subject to flow control.
   <DL><DT><B>Returns:</B></DT><DD>a reference to this, so the API can be used fluently</DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>type</code> -  the 8-bit frame type</DD><DD><code>flags</code> -  the 8-bit frame flags</DD><DD><code>payload</code> -  the frame payload</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="writeCustomFrame(io.vertx.groovy.core.http.HttpFrame)"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4><a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html'>HttpServerResponse</a> <strong>writeCustomFrame</strong>(<a href='../../../../../io/vertx/groovy/core/http/HttpFrame.html'>HttpFrame</a> frame)</h4>
                                <p> Like <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#writeCustomFrame' title='HttpServerResponse.writeCustomFrame'>HttpServerResponse.writeCustomFrame</a> but with an <a href='../../../../../io/vertx/groovy/core/http/HttpFrame.html' title='HttpFrame'>HttpFrame</a>. <DL><DT><B>Returns:</B></DT><DD></DD></DL><DL><DT><B>Parameters:</B></DT><DD><code>frame</code> -  the frame to write</DD></DL></p>
                            </li>
                        </ul>
                    
                        <a name="writeQueueFull()"><!-- --></a>
                        <ul class="blockListLast">
                            <li class="blockList">
                                <h4>boolean <strong>writeQueueFull</strong>()</h4>
                                <p> This will return <code>true</code> if there are more bytes in the write queue than the value set using <a href='../../../../../io/vertx/groovy/core/http/HttpServerResponse.html#setWriteQueueMaxSize' title='HttpServerResponse.setWriteQueueMaxSize'>HttpServerResponse.setWriteQueueMaxSize</a>
   <DL><DT><B>Returns:</B></DT><DD>true if write queue is full</DD></DL></p>
                            </li>
                        </ul>
                    
                </li>
            </ul>
            
        </li>
    </ul>
</div>

<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
    <!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
    <!--   -->
</a>
    <ul class="navList" title="Navigation">
        <li><a href="../../../../../overview-summary.html">Overview</a></li>
        <li><a href="package-summary.html">Package</a></li>
        <li class="navBarCell1Rev">Class</li>
        <li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
        <li><a href="../../../../../index-all.html">Index</a></li>
        <li><a href="../../../../../help-doc.html">Help</a></li>
    </ul>
</div>

<div class="subNav">
    <div>
        <ul class="navList">
            <li><a href="../../../../../index.html?io/vertx/groovy/core/http/HttpServerResponse" target="_top">Frames</a></li>
            <li><a href="HttpServerResponse.html" target="_top">No Frames</a></li>
        </ul>
    </div>
    <div>
        <ul class="subNavList">
            <li>Summary:&nbsp;</li>
            Nested&nbsp;&nbsp;&nbsp;Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_summary">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_summary">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
        <ul class="subNavList">
            <li>&nbsp;|&nbsp;Detail:&nbsp;</li>
            Field&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<li><a href="#constructor_detail">Constructor</a></li>&nbsp;&nbsp;&nbsp;<li><a href="#method_detail">Method</a></li>&nbsp;&nbsp;&nbsp;
        </ul>
    </div>
    <p>Groovy Documentation</p>
    <a name="skip-navbar_bottom">
        <!--   -->
    </a>
    </div>
</div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>